TestCase
(
	'org.puremvc.js.patterns.observer.ObserverTest'
,	{
	
		observerTestVar: null
	,	setUp: function ()
		{
			this.observerTestVar= null;
		}
		
	,	testObserverAccessors: function ()
		{
			var observer= new Observer(null, null)
			,	noteName= 'observerTestNote'
			,	noteBody= 10
			,	note= new Notification(noteName, noteBody)
			
			observer.setNotifyContext(this);
			observer.setNotifyMethod(this.observerTestMethod);
			observer.notifyObserver(note);
			
			assertSame('The observerTestVar was set correctly after notification was dispatched', noteBody, this.observerTestVar);
		}
		
		
	,	testObserverConstructor: function ()
		{
			var observer= new Observer(this.observerTestMethod, this)
			,	noteName= 'observerTestNote'
			,	noteBody= 5
			,	note= new Notification(noteName, noteBody)
			
			observer.notifyObserver(note);
			
			assertSame('The observerTestVar was set correctly after notification was dispatched', noteBody, this.observerTestVar);	
		}
		
	,	testCompareNotifyContext: function ()
		{
			var observer= new Observer(this.observerTestMethod, this)
			,	negTestObj= {}
			
			assertFalse('The notifyContext is not negTestObj', observer.compareNotifyContext(negTestObj));
			assertTrue('The notifyContext is this TestCase', observer.compareNotifyContext(this));
		}
		
	,	observerTestMethod: function (note)
		{
			this.observerTestVar= note.getBody();
		}	
	}
);
